import {Middleware} from 'redux'
// 执行时机在dispatch一个action和action到达reducer之间

// actionLog = (store) => (next) => (action) => {} 中间件公式
export const actionLog: Middleware = (store) => (next) => (action) => {
  console.log("state当前", store.getState())
  console.log("fire action", action)
  // 分发action
  next(action)
  // reducer处理后
  console.log("state更新", store.getState())
}